{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 进阶作业——Ames 房价预测"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## SVM (RBF)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "#首先导入必要的模块\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "\n",
    "from sklearn.metrics import classification_report\n",
    "from sklearn.metrics import confusion_matrix\n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "#读取训练数据\n",
    "train_data = pd.read_json(\"RentListingInquries_train.json\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def convertStrToint(str_arr):\n",
    "    \n",
    "    int_arr=[]\n",
    "\n",
    "    for i in range(len(str_arr)):\n",
    "\n",
    "        if(str_arr[i] == 'low'):\n",
    "\n",
    "            int_arr.append(0)\n",
    "\n",
    "        elif(str_arr[i] == 'medium'):\n",
    "\n",
    "            int_arr.append(1)\n",
    "\n",
    "        elif(str_arr[i] == 'high'):\n",
    "\n",
    "            int_arr.append(2) \n",
    "            \n",
    "    return int_arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def removeUselessData(data):\n",
    "    \n",
    "    remove_data = data.drop([\"building_id\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"created\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"description\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"display_address\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"features\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"listing_id\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"manager_id\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"photos\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"street_address\"], axis = 1)\n",
    "    remove_data = remove_data.drop([\"interest_level\"], axis = 1)\n",
    "    \n",
    "    return remove_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd_str = train_data['interest_level']\n",
    "\n",
    "interest_level_str_arr = pd_str.values\n",
    "\n",
    "#将y值（interest_level）的字符串转换为int\n",
    "interest_level_int = convertStrToint(interest_level_str_arr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "#数据标准化\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "\n",
    "#初始化特征的标准化器\n",
    "ss_X = StandardScaler()\n",
    "\n",
    "#删除无用的数据\n",
    "remove_data = removeUselessData(train_data)\n",
    "\n",
    "#分别对训练和测试数据的特征进行标准化处理\n",
    "X_train = ss_X.fit_transform(remove_data)\n",
    "\n",
    "y_train = interest_level_int\n",
    "\n",
    "#限制训练集个数为1000\n",
    "n_trains = 1000\n",
    "y_train = y_train[:n_trains]\n",
    "X_train = X_train[:n_trains]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\YuGo\\Anaconda3\\lib\\site-packages\\sklearn\\model_selection\\_split.py:2026: FutureWarning: From version 0.21, test_size will always complement train_size unless both are specified.\n",
      "  FutureWarning)\n"
     ]
    }
   ],
   "source": [
    "#训练样本\n",
    "from sklearn.model_selection import train_test_split\n",
    "X_train_part, X_val, y_train_part, y_val = train_test_split(X_train, y_train, train_size = 0.8, random_state = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.svm import LinearSVC\n",
    "\n",
    "SVC1 = LinearSVC().fit(X_train_part, y_train_part)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Classification report for classifier LinearSVC(C=1.0, class_weight=None, dual=True, fit_intercept=True,\n",
      "     intercept_scaling=1, loss='squared_hinge', max_iter=1000,\n",
      "     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,\n",
      "     verbose=0):\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "          0       0.68      0.99      0.81       133\n",
      "          1       0.50      0.05      0.09        59\n",
      "          2       0.00      0.00      0.00         8\n",
      "\n",
      "avg / total       0.60      0.68      0.56       200\n",
      "\n",
      "\n",
      "Confusion matrix\n",
      "[[132   1   0]\n",
      " [ 56   3   0]\n",
      " [  6   2   0]]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\YuGo\\Anaconda3\\lib\\site-packages\\sklearn\\metrics\\classification.py:1135: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples.\n",
      "  'precision', 'predicted', average, warn_for)\n"
     ]
    }
   ],
   "source": [
    "#在效验集上测试，估计模型性能\n",
    "y_predict = SVC1.predict(X_val)\n",
    "\n",
    "print(\"Classification report for classifier %s:\\n%s\\n\" % (SVC1, classification_report(y_val, y_predict)))\n",
    "print(\"Confusion matrix\\n%s\" % confusion_matrix(y_val, y_predict))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 线性SVM正则参数调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "def fit_grid_point_Linear(C, X_train, y_tain, X_val, y_val):\n",
    "    #利用SVC训练\n",
    "    SVC2 = LinearSVC(C=C)\n",
    "    SVC2 = SVC2.fit(X_train, y_train)\n",
    "    \n",
    "    #返回accuracy\n",
    "    accuracy = SVC2.score(X_val, y_val)\n",
    "    \n",
    "    print(\"accuracy:{}\".format(accuracy))\n",
    "    \n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy:0.665\n",
      "accuracy:0.68\n",
      "accuracy:0.68\n",
      "accuracy:0.675\n",
      "accuracy:0.68\n",
      "accuracy:0.53"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "No handles with labels found to put in legend.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X20VPV97/H3h2fxIaAckXAwYHOIYqJGRnwgUSHGgJozNVijSdqam2jaxqZ2VXP1Nms1MV3rtk17mzbl3lXjTfNwmxgrRlBQRCU+xoRDfARCRHzgiJGTo8b4gIB87x97nzAMc5jhePbZ8/B5rTWLs/fsmfkOcOYzv9/e+7sVEZiZme3NsLwLMDOz+uewMDOzqhwWZmZWlcPCzMyqcliYmVlVDgszM6vKYWFmZlU5LMzMrCqHhZmZVTUi7wIGy4QJE2Lq1Kl5l2Fm1lBWr17964hoq7Zd04TF1KlT6erqyrsMM7OGIumZWrbzNJSZmVXlsDAzs6ocFmZmVlXT7LMwM2t127dvp7u7m61bt+5x35gxY2hvb2fkyJEDem6HhZlZk+ju7ubAAw9k6tSpSPrd+oigt7eX7u5upk2bNqDnznQaStI8SeslbZB0ZT/bnC9praQ1kr5fsv4f0nXrJP2rSt+5mZntYevWrRxyyCGUf1xK4pBDDqk44qhVZiMLScOBhcCHgW5glaQlEbG2ZJsO4CpgdkS8JOnQdP0pwGzgmHTT+4DTgB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MJ6KnlydMQ2SbpwEGu22xAHBZmA1Op1fve1gO8QdIdFGANcKykvf0Ojga2DqA2s0HnsDAbmHuAj6cX22kDTgV+BtwHLEj3XUwETi95zDrg3QAR8STQBXwl7RCLpI6+a6tIOgToiYjtQ/WGzPbGYWE2MD8CHgUeAe4CvphOOy0iuWbI48C/k1yd7jfpY5aye3h8FjgM2CDpMeCb7Lq2yBxgWbZvwax27jprNsgkHRARr6ajg58BsyPiV+k1Flamy/3t2O57jhuBq1rkuvDWAHw0lNnguyW9CM8o4KvpiIOIeEPS35Bc8/zZ/h6cXpTqJgeF1ROPLMzMrCrvszAzs6ocFmZmVpXDwszMqnJYmJlZVQ4LMzOrymFhZmZV/X98lVV1T3QOsAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#需要调优的参数\n",
    "C_s = np.logspace(-1, 4, 6)# logspace(a,b,N)把10的a次方到10的b次方区间分成N份  \n",
    "#penalty_s = ['l1','l2']\n",
    "\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "#    for j, penalty in enumerate(penalty_s):\n",
    "    tmp = fit_grid_point_Linear(oneC, X_train, y_train, X_val, y_val)\n",
    "    accuracy_s.append(tmp)\n",
    "\n",
    "x_axis = np.log10(C_s)\n",
    "#for j, penalty in enumerate(penalty_s):\n",
    "pyplot.plot(x_axis, np.array(accuracy_s), 'b-')\n",
    "    \n",
    "pyplot.legend()\n",
    "pyplot.xlabel( 'log(C)' )                                                                                                      \n",
    "pyplot.ylabel( 'accuracy' )\n",
    "pyplot.savefig('SVM_Advance.png' )\n",
    "\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## RBF核"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.svm import SVC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "def fit_grid_point_RBF(C, gamma, X_train, y_train, X_val, y_val):\n",
    "    \n",
    "    # 在训练集是那个利用SVC训练\n",
    "    SVC3 =  SVC( C = C, kernel='rbf', gamma = gamma)\n",
    "    SVC3 =  SVC3.fit(X_train, y_train)\n",
    "    \n",
    "    # 在校验集上返回accuracy\n",
    "    accuracy = SVC3.score(X_val, y_val)\n",
    "    \n",
    "    print(\"accuracy: {}\".format(accuracy))\n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.735\n",
      "accuracy: 0.805\n",
      "accuracy: 0.94\n",
      "accuracy: 0.995\n",
      "accuracy: 0.755\n",
      "accuracy: 0.845\n",
      "accuracy: 0.955\n",
      "accuracy: 1.0\n",
      "accuracy: 0.78\n",
      "accuracy: 0.895\n",
      "accuracy: 0.985\n",
      "accuracy: 1.0\n",
      "accuracy: 0.79\n",
      "accuracy: 0.915\n",
      "accuracy: 0.995\n",
      "accuracy: 1.0\n"
     ]
    }
   ],
   "source": [
    "#需要调优的参数\n",
    "C_s = np.logspace(2, 5, 4)# logspace(a,b,N)把10的a次方到10的b次方区间分成N份 \n",
    "gamma_s = np.logspace(1, 4, 4)  \n",
    "\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    for j, gamma in enumerate(gamma_s):\n",
    "        tmp = fit_grid_point_RBF(oneC, gamma, X_train, y_train, X_val, y_val)\n",
    "        accuracy_s.append(tmp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGx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959992oB4RDueqqq/j5z3/OXXfdBcA555zDkiVLmDy5+xvv1q5dy/Lly6moqGDHjh3Mnz+fDz74gLi43msPRDI31EhgR9Bypbsu2Brg8+7784BMEckNc19jTAx59tlnOeGEE5gxYwYXXHABDQ0NAFx//fVMnDiRqVOncsMNN/D3v/+dFStW8I1vfINpZWVs+2AdNOxx7l6u2QKfboCda2DPRjedRRU07XcCSFy80woYUswjL7zLlDO+zOR5F/KdX/zBmZ6aUcDdDy3j6ElTmTP3VK644gq+/vWvA7By5UqOO+444uOdgeh//etfTJ06ldmzZ3P99dczbdo0ALZs2cJnPvMZpk+fzrHHHhsIkC+++CJz585l0aJFjB8/nptuuomHHnqI4447jqlTpwZaVxdffDHXXHMNc+fOZezYsbz++utccsklTJgwgcsvvzzw97ryyispLy9n0qRJ3HLLLYH1c+bM4bnnnqO11blj+4QTTqCwsPCQf/unnnqKxYsXk5SUxNixYxk9ejSrV6/uhW/1oEi2LLoK3dph+TrgNyJyKfA68AngC3NfRORK4EqA0aNHH0ldjekXfvDXDVRU1fXqZ04ckcX3Fk46os/YvXs3t956Ky+99BJpaWn8+Mc/5s477+Ty//xPVqz4GxvefQtpbWZ/zW5yMlJYcOqJLFpwKufOnwP4nEARzsByQjKk51FZ08BN3/8hq1atIjs7m3nz5vHMM89QVlbGrbfeyrvvvkt6ejpz5sxh5syZAPzjH//g2GOPDdT5sssu48EHH2TmzJlcd911gfXDhw9n5cqVpKSk8P7773PJJZcEAsaaNWvYuHEj2dnZFBcXc/XVV/POO+9wxx138Jvf/Ibbb78dgNraWl555RUef/xxFi5cyJtvvsmECROYMWMG69evZ/Lkydx6660MHToUn88XCEITJ04kPj6e4uJi1q9fT1lZWVh//08++YQ5c+YElouKivjkk0847rjjev6ldhDJYFEJjApaLgKqgguoahVwPoCIZACfV9VaEakE5nTY99WOv0BV7wHuASgvL+8UTIwxfeOfb/ydiooNzD5+FtBGS3MLJ82aztCWSuLavHzlP7/MmaedxFnzTgafgMQ7A8vZow5ORe3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FgYY4wJyYKFMYdBRA6ELnXI/R8TkTHu+wwRuVtEtoiTpfZ1EZklIknu+8E0td3EOAsWxvQRNz9XvKpudVfdizOvf7yqTsKZ35+nqi3AS8R2FlczyFiwMKYH3Dtkfy4i693nC1zgro8Tkd+5LYVnRGSFiCxyd/sP4Cm33Fic1NE3qWobgKpuVdW/uWWfdMsbExOsmWtMz5wPTAPKgDzgHRF5Hefu+mJgCjAMJ3XE/e4+JwJL3feTgPdUtbWbz18PHBeRmhvTA9ayMKZnTgKWullmPwVewzm5nwT8RVXbVHUX8ErQPsOBPeF8uBtEWvy5gIyJNgsWxvRMdw/6OdQDgJqAFPf9BqBMRA71fzAZ8PSgbsb0OgsWxvTM68AF7sOO8oGTgbeBN3AepBMnIgXAnKB9NgLjAFR1C7AK+EFQduDxInKO+z4X2KOq3r46IGMOxYKFMT3zBLAWWAO8DHzL7XZ6HOeZAuuBu3GeYFjr7vM32gePK4BCYLOIrMN5loL/2QNzcTKIGhMTLOusMb1MRDJU9YDbOngb5+lmu9xnXLziLnc3sO3/jOXAjar6QR9U2ZiQbDaUMb3vGfchSEnAD90WB6raJCLfw3km8sfd7SwiScCTFihMLLGWhTHGmJBszMIYY0xIFiyMMcaEZMHCGGNMSBYsjDHGhGTBwhhjTEgWLIwxxoT0/wG/zRA5M6HrZwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "accuracy_s1 =np.array(accuracy_s).reshape(len(C_s),len(gamma_s))\n",
    "x_axis = np.log10(C_s)\n",
    "for j, gamma in enumerate(gamma_s):\n",
    "    pyplot.plot(x_axis, np.array(accuracy_s1[:,j]), label = ' Test - log(gamma)' + str(np.log10(gamma)))\n",
    "\n",
    "pyplot.legend()\n",
    "pyplot.xlabel( 'log(C)' )                                                                                                      \n",
    "pyplot.ylabel( 'accuracy' )\n",
    "pyplot.savefig('RBF_SVM_Otto.png' )\n",
    "\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
